﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BasketPage.aspx.cs" Inherits="WholesaleOnline.WebUI.Pages.BasketPage"
    MasterPageFile="~/Master/MasterBase.Master" %>

<asp:Content ID="headContent" ContentPlaceHolderID="cphHead" runat="server">
    <script type="text/javascript" src="../js/model/oo.basket.js"></script>
    <script type="text/javascript">
        $(function () {
            oo('basket').init();
        });
    </script>
</asp:Content>
<asp:Content ID="mainContent" ContentPlaceHolderID="cphContent" runat="server">
    <div id="divBasket" style="width: 600px;">
    </div>
    <textarea id="txtBasketTemplate" rows="0" cols="0" style="display: none">
        <!--
        {#foreach $T as basket}
        <table cellpadding="5" cellspacing="0" border="1">
            <tr>
                <td style="border-right: 0px">
                    {$T.basket.sellerName}
                </td>
                <td colspan="4" align="right" style="border-left:0px">
                    <a href="#" class="easyui-linkbutton">下单</a>
                </td>
            </tr>
            <tr>
                <td align="center" width="300">
                    商品
                </td>
                <td align="center" width="50">
                    价格
                </td>
                <td align="center">
                    数量
                </td>
                <td align="center" width="80">
                    小计
                </td>
                <td align="center" width="60">
                    操作
                </td>
            </tr>
        {#foreach $T.basket.items as item}
            <tr>
                <td>
                    <img src="../images/product/{$T.item.img}" style="float: left; width: 50px; height: 50px;" />
                    <div style="width: 250px">
                        {$T.item.name}
                    </div>
                </td>
                <td align="right">
                    {$T.item.price}
                </td>
                <td>
                    <input type="text" value="{$T.item.qty}" class="easyui-numberbox" style="text-align: right; width: 50px;" onChange="oo('basket').changeQty('{$T.item.id}', $(this).val())"/>
                </td>
                <td align="right">
                    {$T.item.totalPrice}
                </td>
                <td>
                    <a href="#" class="easyui-linkbutton" onclick="oo('basket').removeItem('{$T.item.id}')">删除</a>
                </td>
            </tr>
        {#/for}
        </table>
        <div style="text-align: right;">
            总计：<span style="color: Red">{$T.basket.totalPrice}</span>
        </div>
        {#else} 购物车中还没有商品,请选购吧! {#/for}
        -->
    </textarea>
</asp:Content>
